package com.xiaor.rssfigure.service.impl;

import com.xiaor.rssfigure.dao.FigureDao;
import com.xiaor.rssmodel.model.Figure;
import com.xiaor.rssfigure.service.FigureService;
import com.xiaor.rssutils.pager.Page;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FigureServiceImpl implements FigureService {
    @Autowired
    private FigureDao figureDao;
    private static Logger logger = LoggerFactory.getLogger(FigureServiceImpl.class);

    @Override
    public Figure findByName(Figure figure) {
        logger.info("findByName");
        return figureDao.findByName(figure);
    }

    @Override
    public List<Figure> findAll(Page page) {
        logger.info("findAll");
        return figureDao.findAll(page);
    }

    @Override
    public List<Figure> findSimpleAll(Page page) {
        logger.info("findSimpleAll");
        return figureDao.findSimpleAll(page);
    }
}
